package com.cloudbroker.bcs.platform.ltb.bizapi.constants.type;

/**
 * 客户验证业务类型
 * @author zhaohc
 *
 */
public enum ClientVerifyBizType {
    
    /**
     * 注册
     */
    REGISTER(1, "注册"),
    
    /**
     * 设置密码
     */
    SET_PWD(2, "设置密码"),
    
    /**
     * 交易
     */
    TRANSACTION(3, "交易"),
    
    /**
     * 修改手机号
     */
    UPDATEMOBILE(4, "修改手机号"),
    
    ;
    
    private final int val;
    
    private final String description;
    
    private String toString;
    
    private ClientVerifyBizType(int val, String description) {
        this.val = val;
        this.description = description;
    }
    
    public int getVal() {
        return val;
    }
    
    public String getDescription() {
        return description;
    }
    
    public static ClientVerifyBizType getByVal(int val) {
        for (ClientVerifyBizType s : ClientVerifyBizType.values()) {
            if (s.getVal() == val) {
                return s;
            }
        }
        return null;
    }
    
    @Override
    public String toString() {
        if (null == toString) {
            toString = new StringBuilder().append("ClientVerifyBizType[").append(val).append(':')
                    .append(description).append(']').toString();
        }
        return toString;
    }
    
}
